package com.dyh.quickdemozwei;

import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import com.sun.tools.javac.util.List;
import lombok.Getter;
import lombok.Setter;
import org.junit.jupiter.api.Test;

import java.io.UnsupportedEncodingException;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;

public class TestRunableThrow {
    @Test
    public void test(){
        Runnable a=()->{
            if (1==1)
                throw new RuntimeException("1");
        };


        a.run();
    }

    @Setter@Getter
    static class Foo{
        Long productId;
    }

    public static void main(String[] args) throws UnsupportedEncodingException {

        System.out.println("123".getBytes("gbk").length);
        System.out.println("123开".getBytes("gbk").length);


//        String.valueOf(valMap.get("title")).getBytes("gbk").length>60
    }

    public static void f(){
        try{
           int res =  1/0;
        }
        catch (Exception x){
            System.out.println(x);
            throw new RuntimeException(x);
        }
        finally {
            System.out.println("finally");
        }
    }
}
